#!/bin/bash

# menu hj
function filehead_line() {
  echo $1 '>' $2
  echo . > $2
  
  for i in `find $1`
  do
    if [ -d "$i" ]
    then
      echo ### $i >> $2
    else
      head -n 1 "$i" >> $2
    fi
  done
  return 0;
}

# menu_hj
filehead_line "../leetcode"  "menu_lk.txt"

# menu_oj
filehead_line  "../leetcode2"  "menu_lk2.txt"
